package cn.sourcespro.shiro.controller;

import cn.sourcespro.shiro.crudparams.dto.AddUserDto;
import cn.sourcespro.shiro.service.UserService;
import cn.sourcespro.shiro.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * security
 *
 * @author zhanghaowei
 * @date 2018/7/14
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("add")
    String add(@RequestBody AddUserDto dto){
        userService.add(dto);
        return "ok";
    }

}
